<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>管理员登录 - 天气数据可视化系统</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='bootstrap/bootstrap.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='fontawesome-6.4.0/css/all.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/admin_login.css') }}">
    <script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
</head>
<body>
    <div class="login-container">
        <div class="login-header">
            <div class="logo"><i class="fas fa-cloud-sun"></i></div>
            <h2>管理员登录</h2>
            <div class="system-name">天气数据可视化系统</div>
        </div>

        <div class="login-form">
            {% with messages = get_flashed_messages() %}
                {% if messages %}
                    {% for message in messages %}
                        <div class="alert alert-danger">
                            <i class="fas fa-exclamation-circle mr-2"></i> {{ message }}
                        </div>
                    {% endfor %}
                {% endif %}
            {% endwith %}

            <form method="post">
                <div class="form-group">
                    <label for="username">用户名</label>
                    <div class="input-with-icon">
                        <i class="fas fa-user input-icon"></i>
                        <input type="text" class="form-control" id="username" name="username" placeholder="请输入用户名" required>
                    </div>
                </div>
                <div class="form-group">
                    <label for="password">密码</label>
                    <div class="input-with-icon">
                        <i class="fas fa-lock input-icon"></i>
                        <input type="password" class="form-control" id="password" name="password" placeholder="请输入密码" required>
                    </div>
                </div>
                <div class="btn-container">
                    <button type="submit" class="btn btn-primary">登录系统</button>
                </div>
            </form>
            <a href="{{ url_for('index') }}" class="back-link">
                <i class="fas fa-arrow-left"></i> 返回前台
            </a>
        </div>
    </div>

</body>
</html>
